<template>
	<view>
		我是商城
		
		<view style="position: sticky;z-index: 111;top: 0;height: 100px;background: yellowgreen;" class="">
			吸顶元素
		</view>
		<view class="" style="height: 100px;background: red;margin-top: 30px;" v-for="(item,i) in 10">
			{{ i }}
		</view>
	</view>
</template>

<script setup lang="ts">
	import { onMounted,onUnmounted } from 'vue';
	
	onMounted(()=>{
		uni.$on('onReach',(params)=>{
			console.log('params',params.value)
			if(params.value == 'mall'){
				console.log('mall页面发生了触底事件')
			}
		})
	})
	onUnmounted(()=>{
		uni.$off('onReach')
	})
</script>

<style>
</style>